<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template basic_ovectorstream</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.vectorstream_8hpp" title="Header &lt;boost/interprocess/streams/vectorstream.hpp&gt;">
<link rel="prev" href="classboost_1_1interprocess_1_1basic__ivectorstream.html" title="Class template basic_ivectorstream">
<link rel="next" href="classboost_1_1interprocess_1_1basic__vectorbuf.html" title="Class template basic_vectorbuf">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1interprocess_1_1basic__ivectorstream.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.vectorstream_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1interprocess_1_1basic__vectorbuf.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template basic_ovectorstream</span></h2>
<p>boost::interprocess::basic_ovectorstream</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.vectorstream_8hpp" title="Header &lt;boost/interprocess/streams/vectorstream.hpp&gt;">boost/interprocess/streams/vectorstream.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharVector<span class="special">,</span> <span class="keyword">typename</span> CharTraits<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html" title="Class template basic_ovectorstream">basic_ovectorstream</a> <span class="special">:</span>
  <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharVector</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">CharVector</span>                                                              <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a63e96125400dd8272e1189101c92b93f"></a><span class="identifier">vector_type</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ios</span><span class="special">&lt;</span> <span class="identifier">typenameCharVector</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">char_type</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a1f54b032a5adf82f40966f4cbf76591f"></a><span class="identifier">char_type</span><span class="special">;</span>  
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ios</span><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">int_type</span>                       <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a7ddd0f0b00871e1a9d55d09704d919bc"></a><span class="identifier">int_type</span><span class="special">;</span>   
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ios</span><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">pos_type</span>                       <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1aa40c1a16d32eca25e2925cc8fe566f0b"></a><span class="identifier">pos_type</span><span class="special">;</span>   
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ios</span><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">off_type</span>                       <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a519217ab41cdf86976eaebe994e9cfca"></a><span class="identifier">off_type</span><span class="special">;</span>   
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ios</span><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">traits_type</span>                    <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a4cd4d2e4f6da2a0d931438e74247b725"></a><span class="identifier">traits_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="../boost_container_header_reference/classboost_1_1container_1_1node__handle.html#id73-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a929dbc22234d8c69a788e1df819dd625"><span class="identifier">basic_ovectorstream</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">openmode</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">out</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> VectorParameter<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a57df68fe9fa08e2efd3f24a2511df8fd"><span class="identifier">basic_ovectorstream</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">VectorParameter</span> <span class="special">&amp;</span><span class="special">,</span> 
                        <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">openmode</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">out</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1basic__vectorbuf.html" title="Class template basic_vectorbuf">basic_vectorbuf</a><span class="special">&lt;</span> <span class="identifier">CharVector</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span> <span class="special">*</span> <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1ab349aa74673192baa228914da34a453f"><span class="identifier">rdbuf</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a424f3d26398163eaed550635e9219c21"><span class="identifier">swap_vector</span></a><span class="special">(</span><span class="identifier">vector_type</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="identifier">vector_type</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a63fe834402688f59d679d8e4d4b006d3"><span class="identifier">vector</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a66d3e3f39eab5924c1eeb3efdf4e30e8"><span class="identifier">reserve</span></a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">vector_type</span><span class="special">::</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.16.19.3.55.5.4"></a><h2>Description</h2>
<p>A basic_ostream class that holds a character vector specified by CharVector template parameter as its formatting buffer. The vector must have contiguous storage, like std::vector, boost::interprocess::vector or boost::interprocess::basic_string </p>
<div class="refsect2">
<a name="id-1.3.16.19.3.55.5.4.3"></a><h3>
<a name="id73-bb"></a><code class="computeroutput">basic_ovectorstream</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a929dbc22234d8c69a788e1df819dd625"></a><span class="identifier">basic_ovectorstream</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">openmode</span> mode <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">out</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructor. Throws if vector_type default constructor throws. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> VectorParameter<span class="special">&gt;</span> 
  <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a57df68fe9fa08e2efd3f24a2511df8fd"></a><span class="identifier">basic_ovectorstream</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">VectorParameter</span> <span class="special">&amp;</span> param<span class="special">,</span> 
                      <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">openmode</span> mode <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">out</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructor. Throws if vector_type(const VectorParameter &amp;param) throws. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1interprocess_1_1basic__vectorbuf.html" title="Class template basic_vectorbuf">basic_vectorbuf</a><span class="special">&lt;</span> <span class="identifier">CharVector</span><span class="special">,</span> <span class="identifier">CharTraits</span> <span class="special">&gt;</span> <span class="special">*</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1ab349aa74673192baa228914da34a453f"></a><span class="identifier">rdbuf</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Returns the address of the stored stream buffer. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a424f3d26398163eaed550635e9219c21"></a><span class="identifier">swap_vector</span><span class="special">(</span><span class="identifier">vector_type</span> <span class="special">&amp;</span> vect<span class="special">)</span><span class="special">;</span></pre>
<p>Swaps the underlying vector with the passed vector. This function resets the write position in the stream. Does not throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="identifier">vector_type</span> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a63fe834402688f59d679d8e4d4b006d3"></a><span class="identifier">vector</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Returns a const reference to the internal vector. Does not throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a66d3e3f39eab5924c1eeb3efdf4e30e8"></a><span class="identifier">reserve</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">vector_type</span><span class="special">::</span><span class="identifier">size_type</span> size<span class="special">)</span><span class="special">;</span></pre>
<p>Calls <a class="link" href="classboost_1_1interprocess_1_1basic__ovectorstream.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1basic__ovectorstream_1a66d3e3f39eab5924c1eeb3efdf4e30e8">reserve()</a> method of the internal vector. Resets the stream to the first position. Throws if the internals vector's reserve throws. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005-2024 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1interprocess_1_1basic__ivectorstream.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.vectorstream_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1interprocess_1_1basic__vectorbuf.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
